#include "DialogEditNote.h"

//(*InternalHeaders(DialogEditNote)
#include <wx/intl.h>
#include <wx/string.h>
//*)

#include "wxImagePanel.h"

//(*IdInit(DialogEditNote)
const long DialogEditNote::ID_TEXTCTRL1 = wxNewId();
const long DialogEditNote::ID_STATICTEXT1 = wxNewId();
const long DialogEditNote::ID_STATICTEXT2 = wxNewId();
const long DialogEditNote::ID_STATICTEXT3 = wxNewId();
const long DialogEditNote::ID_TEXTCTRL2 = wxNewId();
const long DialogEditNote::ID_PANEL1 = wxNewId();
const long DialogEditNote::ID_STATICBOX1 = wxNewId();
const long DialogEditNote::ID_TEXTCTRL3 = wxNewId();
const long DialogEditNote::ID_BUTTON1 = wxNewId();
const long DialogEditNote::ID_BUTTON2 = wxNewId();
const long DialogEditNote::ID_BUTTON3 = wxNewId();
const long DialogEditNote::ID_BUTTON4 = wxNewId();
//*)

BEGIN_EVENT_TABLE(DialogEditNote,wxDialog)
	//(*EventTable(DialogEditNote)
	//*)
END_EVENT_TABLE()

DialogEditNote::DialogEditNote(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
	//(*Initialize(DialogEditNote)
	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
	SetClientSize(wxSize(519,835));
	Move(wxDefaultPosition);
	TextCtrl1 = new wxTextCtrl(this, ID_TEXTCTRL1, _("Text"), wxPoint(88,56), wxSize(144,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	StaticText1 = new wxStaticText(this, ID_STATICTEXT1, _("书名"), wxPoint(40,64), wxDefaultSize, 0, _T("ID_STATICTEXT1"));
	StaticText2 = new wxStaticText(this, ID_STATICTEXT2, _("页数"), wxPoint(40,120), wxDefaultSize, 0, _T("ID_STATICTEXT2"));
	StaticText3 = new wxStaticText(this, ID_STATICTEXT3, _("图片"), wxPoint(40,184), wxDefaultSize, 0, _T("ID_STATICTEXT3"));
	TextCtrl2 = new wxTextCtrl(this, ID_TEXTCTRL2, _("Text"), wxPoint(88,120), wxSize(120,27), 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
	Panel1 = new wxPanel(this, ID_PANEL1, wxPoint(96,192), wxSize(368,256), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
	StaticBox1 = new wxStaticBox(this, ID_STATICBOX1, _("摘录"), wxPoint(32,488), wxDefaultSize, 0, _T("ID_STATICBOX1"));
	TextCtrl3 = new wxTextCtrl(this, ID_TEXTCTRL3, _("Text"), wxPoint(96,488), wxSize(368,216), wxTE_AUTO_SCROLL|wxTE_MULTILINE|wxVSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL3"));
	Button1 = new wxButton(this, ID_BUTTON1, _("新增"), wxPoint(120,776), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	Button2 = new wxButton(this, ID_BUTTON2, _("关闭"), wxPoint(248,776), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
	Button3 = new wxButton(this, ID_BUTTON3, _("上一条"), wxPoint(120,728), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
	Button4 = new wxButton(this, ID_BUTTON4, _("下一条"), wxPoint(248,728), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON4"));
	
	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogEditNote::OnAddNote);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogEditNote::OnClose);
	Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogEditNote::OnPreviousNote);
	Connect(ID_BUTTON4,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogEditNote::OnNextNote);
	//*)

	wxInitAllImageHandlers();

	// then simply create like this
	delete Panel1;
    Panel1 = new wxImagePanel(this, wxT("1.jpeg"), wxBITMAP_TYPE_JPEG,
                              ID_PANEL1, wxPoint(96,192), wxSize(368,256), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
}

DialogEditNote::~DialogEditNote()
{
	//(*Destroy(DialogEditNote)
	//*)
}


void DialogEditNote::OnPreviousNote(wxCommandEvent& event)
{
}

void DialogEditNote::OnNextNote(wxCommandEvent& event)
{
}

void DialogEditNote::OnAddNote(wxCommandEvent& event)
{
}

void DialogEditNote::OnClose(wxCommandEvent& event)
{
    this->Show(false);
}
